package day04;

import java.util.Scanner;

public class CommandBySwitch {
    public static void main(String[] args) {

        int a=2,b=0;
        while (a<9){
            b+=1;
            a=a+1;
        }
        System.out.println(b);
        int num=1,count =0;
        while (count<5){
            count++;
            num++;
            }
        System.out.println(num);
       /* Scanner a= new Scanner(System.in);
        System.out.println("请选择功能：1.存款 2.取款 3.转账 4.退出");
        int command = a.nextInt();

        switch (command){
            case 1:
                System.out.println("存款");
                break;
            case 2:
                System.out.println("取款");
                break;
            case 3:
                System.out.println("转账");
                break;
            case 4:
                System.out.println("退出");
                break;
            default:
                System.out.println("输入错误");
        }



        if (command==1){
            System.out.println("存款");

        }else if (command==2){
            System.out.println("取款");
        }else if (command==3){
            System.out.println("转账");
        }else if (command==4){
            System.out.println("退出");
        }else {
            System.out.println("输入错误");
        }


 Scanner scan=new Scanner(System.in);
        System.out.println("请输入一个整型");
        int a1=scan.nextInt();
        System.out.println("这个整型为"+a1);
        int num=2;
        switch (num){
            case  1:
                System.out.println("这是1");
                break;
            case  2:
                System.out.println("这是2");
                break;
            case  3:
                System.out.println("这是3");
                break;
            case  4:
                System.out.println("这是4");
                break;
            default:
                System.out.println("这啥也不是");
                break;
        }



        double a=600;
        switch ((double)a){
            case a>2000:
                System.out.println("您的总消费为："+a*0.6);
                break;
            case a>1000:
                System.out.println("您的总消费为："+a*0.8);
                break;
            case a>500:
                System.out.println("您的总消费为："+a*0.9);
                break;
            default://所有的case 都没执行后执行。
                System.out.println("您的总消费为："+a*0.95);
                break;
        }
*/







    }
}
